package cn.online.action;

import java.util.List;

import cn.online.model.Course;
import cn.online.model.Problem;
import cn.online.service.CourseService;
import cn.online.service.ProblemService;
import cn.online.service.ReplyService;
import cn.online.service.StudentService;
import cn.online.service.TeacherService;

import com.opensymphony.xwork2.ActionSupport;

public class HomeAction extends ActionSupport {
	
	private StudentService studentService;
	private TeacherService teacherService;
	private CourseService courseService;
	private ProblemService problemService;
	private ReplyService replyService;
	private List<Course> courseL;
	private List<Problem> problemL;
	
	
	public List<Problem> getProblemL() {
		return problemL;
	}
	public void setProblemL(List<Problem> problemL) {
		this.problemL = problemL;
	}
	public List<Course> getCourseL() {
		return courseL;
	}
	public void setCourseL(List<Course> courseL) {
		this.courseL = courseL;
	}
	public void setCourseService(CourseService courseService) {
		this.courseService = courseService;
	}
	public void setProblemService(ProblemService problemService) {
		this.problemService = problemService;
	}
	public void setReplyService(ReplyService replyService) {
		this.replyService = replyService;
	}
	public void setStudentService(StudentService studentService) {
		this.studentService = studentService;
	}
	public void setTeacherService(TeacherService teacherService) {
		this.teacherService = teacherService;
	}

	public String index(){
		problemL = problemService.getListNew();
		courseL = courseService.findAll();
		return SUCCESS;
	}
	
}
